package utils;

import java.text.SimpleDateFormat;
import java.util.Date;
/**
 * 获取当前时间
 * @author Administrator
 *
 */
public class CurrentTime {

	public static String getCurrentTime() {

		SimpleDateFormat formatter = new SimpleDateFormat("yyyy年MM月dd日HH:mm:ss");
		Date curDate = new Date(System.currentTimeMillis());// 获取当前时间
		String str = formatter.format(curDate);
		return str;
	}
	public static String getCurrentTime$() {

		SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
		Date curDate = new Date(System.currentTimeMillis());// 获取当前时间
		String str = formatter.format(curDate);
		
		return str;
	}
}
